package vo;

public class User extends PetObject {
    private String uid;
    private Role role;
    private String uname;
    private String pwd;
    private String sex;
    private String email;
    private String relName;
    private String address;
    private String telephone;
    private double balance;

    public User() {
    }

    public User(User user) {
        this.setUid(user.getUid());
        this.setRole(user.getRole());
        this.setUname(user.getUname());
        this.setPwd(user.getPwd());
        this.setSex(user.getSex());
        this.setEmail(user.getEmail());
        this.setRelName(user.getRelName());
        this.setAddress(user.getAddress());
        this.setTelephone(user.getTelephone());
        this.setBalance(user.getBalance());
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRelName() {
        return relName;
    }

    public void setRelName(String relName) {
        this.relName = relName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public double getBalance() {
        return balance;
    }

    public void addBalance(double balance) {
        this.balance += balance;
    }
    public void setBalance(double balance) {
    	this.balance = balance;
    }

	@Override
	public String toString() {
		return "User [uid=" + uid + ", role=" + role + ", uname=" + uname + ", pwd=" + pwd + ", sex=" + sex + ", email="
				+ email + ", relName=" + relName + ", address=" + address + ", telephone=" + telephone + ", balance="
				+ balance + "]";
	}


}
